// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from './App';
import VueRouter from 'vue-router';
import VueResource from 'vue-resource';
import goods from 'components/goods/goods';
import ratings from 'components/ratings/ratings';
import seller from 'components/seller/seller';
import 'common/styles/index.styl';
Vue.use(VueRouter);
Vue.use(VueResource);
// 自定义路由
const routes = [
  {path: '/goods', component: goods},
  {path: '/ratings', component: ratings},
  {path: '/seller', component: seller}
];
const router = new VueRouter({
  'routes': routes,
  linkActiveClass: 'active'
});

new Vue({
  router: router,
  // vue 2.x & ES6写法
  render: h => h(App)   // vue 1.x的写法 components: { App }
}).$mount('#app');
router.push('/goods');
